package com.xxl.job.executor.exception;

import com.xxl.job.executor.enums.StatusCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: TollgateException
 * @Description: 收费站数据采集接口异常
 * @Author: wuyiyu
 * @Date: 2019/10/24
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TollgateException extends RuntimeException {

    public TollgateException(Integer errorType, StatusCodeEnum statusCodeEnum, String error) {
        this.errorType = errorType;
        this.error = error;
        this.statusCodeEnum = statusCodeEnum;
    }

    public TollgateException(Integer errorType, StatusCodeEnum statusCodeEnum, List<Map<String, String>> failList) {
        this.errorType = errorType;
        this.statusCodeEnum = statusCodeEnum;
        this.failList = failList;
    }

    private StatusCodeEnum statusCodeEnum;
    private String error;
    /**
     * 1、数据中台校验失败
     * 2、业务系统校验失败
     * 3、其他失败
     */
    private Integer errorType;
    private List<Map<String, String>> failList;
}
